package day4;


public class Point {
    public int x;
    public int y;

    public Point(){
    }




    public Point(int x, int y) {
        this.x=x;
        this.y=x;

    }

   public Point(int x) {
       this(x, x);
   }
    public double distance(Point p) {
        return Math.sqrt(Math.pow(this.x - p.x, 2) + Math.pow(this.y - p.y, 2));
    }

    public double distance(int x, int y) {
        return this.distance(new Point(x, y));
    }

    public double distance() {
        return this.distance(0, 0);

    }
}
